<?php
	$html->addCrumb('Manager','/manager/');
	$html->addCrumb('Dozenten verwalten','/manager/professors/');
	
	echo  $this->element('tasks',array('target'=>'/manager/professors'));
?>
<div class="title">Dozenten verwalten</div>

<?php echo $this->element('flashMessage');
?>

<div>
	<div></div>
	<table>
		<tr>
			<th>Titel</th>
			<th>Vorname</th>
			<th>Nachname</th>
			<th>email</th>
			<th>Telefon</th>
			<th class="noprint">Aktion</th>
		</tr>
		<?php
		$out = '';

		foreach($this->data as $key => $value){
			$out .='<tr>';
			$out .='<td>';
			$out .= $value['Professor']['title'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Professor']['first_name'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Professor']['family_name'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Professor']['email'];
			$out .='</td>';
			$out .='<td>';
			$out .= $value['Professor']['phone_number'];
			$out .='</td>';
			$out .='<td class="noprint">';
			$out .='<a href="'.URL_PREFIX.'/manager/professors/delete/'.$value['Professor']['id'].'"><button>L&ouml;schen</button></a>';
			$out .=' <a href="'.URL_PREFIX.'/manager/professors/update/'.$value['Professor']['id'].'"><button>&Auml;ndern</button></a>';
			$out .='</td>';
			
			$out .='</tr>';
		}
		echo $out;
		?>
	</table>
</div>
